﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="TestTemplate.aspx.cs" Inherits="EXAM.TestTemplate"  %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <h2 class="art-postheader">
        Testing Template
    </h2>
    <div class="cleared">
    </div>
    <div class="cleared">
    </div>
    <div class="art-postcontent">
        <br />
        <telerik:RadGrid ID="dgvList" runat="server" AutoGenerateColumns="False" ShowGroupPanel="True"
            Skin="Sunset" GridLines="None" OnNeedDataSource="dgvList_NeedDataSource" OnGroupsChanging="dgvList_GroupsChanging"
            OnItemDataBound="dgvList_ItemDataBound" 
            OnItemCommand="dgvList_ItemCommand" 
            oninsertcommand="dgvList_InsertCommand" AllowFilteringByColumn="True" 
            AllowPaging="True">
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
            <MasterTableView DataKeyNames="ID">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Category" FieldName="ANAL_T0" HeaderValueSeparator=" : ">
                            </telerik:GridGroupByField>
                            <telerik:GridGroupByField FieldAlias="Topic" FieldName="ANAL_T2" HeaderValueSeparator=" : ">
                            </telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="ANAL_T0" SortOrder="Descending"></telerik:GridGroupByField>
                            <telerik:GridGroupByField FieldName="ANAL_T2" SortOrder="Descending"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridBoundColumn DataField="ID" FilterControlAltText="Filter column1 column"
                        HeaderText="ID" UniqueName="ID" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column"
                        UniqueName="TemplateColumn1" >
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="images/run.png" CommandName="Load"/>
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter column2 column"
                        HeaderText="Name" UniqueName="Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ANAL_T0" FilterControlAltText="Filter column column"
                        HeaderText="Category" UniqueName="ANAL_T0" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ANAL_T2" FilterControlAltText="Filter column column"
                        HeaderText="Topic" UniqueName="ANAL_T2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ANAL_T1" FilterControlAltText="Filter column column"
                        HeaderText="Level" UniqueName="ANAL_T1" Groupable="False" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Score" FilterControlAltText="Filter column column"
                        HeaderText="Max Score" UniqueName="column1" DataFormatString="{0:N0}%">
                        <ItemStyle Width="50px" />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Detail">
                        <ItemTemplate>
                            <asp:ImageButton ID="imgResult" runat="server" ToolTip="Detail"  ImageUrl="images/noimage.png" CommandName="History" />
                        </ItemTemplate>
                        <ItemStyle Width="40px" />
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="True">
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
        </telerik:RadGrid>
    </div>
</asp:Content>
